define(function(require, exports){
	var $ = require("jquery");
	var util = require('util');
	var pubjs = require('pubjs');
	var view  = require('@base/view');
	var common = require('modules/common');

	// 推广组基本模块
	var Base = view.container.extend({
		init:function(config) {

			config = pubjs.conf(config, {
				'class': 'P-campaignEdit'
			});


			this.Super('init', arguments);
		},
		afterBuild:function() {
			var self = this;
			var c = self.getConfig();
			var el = self.getDOM();
			el.append([
				'<div class="P-campaignEditForm">',
					'<a>'+ LANG('设置条件')+'</a>',
				'</div>'
			].join(''));

			self.uiBind(el.find('a'), 'click', 'eventSelect');
			var dlg = this.get('condition');
			if(!dlg){
				this.createAsync('condition', 'promotion/popwin/popwin.condition', {

				}, function(mod){
					if(mod){
						mod.show();
					}
				});
			}else{
				dlg.show();
			}

			self.buildFromTemplate({

			});

		},
		afterBuildTemplate: function() {

		},
		afterBuildStep: function() {

		},
		eventSelect: function(evt, elm){



			return false;
		}
	});
	exports.base = Base;

});